package com.jinzheng.nettytestss.entity;

public class Message {
    /**数据头*/
    private byte[] header;
    /**设备ID号*/
    private String deviceId;
    /**SN号*/
    private int sn;
    /**加密方式*/
    private int encryMode;
    /**指令功能码*/
//    private CommandCode commandCode;
    /**数据体长度*/
    private int bodyLength;
    /**数据体*/
    private byte[] body;
    /**CRC16校验码*/
    private int crc16;

    public Message() {
    }

    public Message(byte[] header, String deviceId, int sn, int encryMode, int bodyLength, byte[] body, int crc16) {
        this.header = header;
        this.deviceId = deviceId;
        this.sn = sn;
        this.encryMode = encryMode;
        this.bodyLength = bodyLength;
        this.body = body;
        this.crc16 = crc16;
    }


    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public int getSn() {
        return sn;
    }

    public void setSn(int sn) {
        this.sn = sn;
    }

    public int getEncryMode() {
        return encryMode;
    }

    public void setEncryMode(int encryMode) {
        this.encryMode = encryMode;
    }

    public int getBodyLength() {
        return bodyLength;
    }

    public void setBodyLength(int bodyLength) {
        this.bodyLength = bodyLength;
    }

    public byte[] getHeader() {
        return header;
    }

    public void setHeader(byte[] header) {
        this.header = header;
    }

    public byte[] getBody() {
        return body;
    }

    public void setBody(byte[] body) {
        this.body = body;
    }

    public int getCrc16() {
        return crc16;
    }

    public void setCrc16(int crc16) {
        this.crc16 = crc16;
    }

}
